import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class project {
    public int firstUniqChar(String s) {
        char[] str=new char[26];
        for(int i=0;i<s.length();i++){
            str[s.charAt(i)-'a']++;
        }
        for(int i=0;i<s.length();i++){
            if(str[s.charAt(i)-'a']==1){
                return i;
            }
        }
        return -1;
    }







    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            String str1=scan.nextLine();
            String str2=scan.nextLine();
            str1.toUpperCase();
            str2.toUpperCase();
            Set<Character> set=new HashSet<>();
            for(int i=0;i<str1.length();i++){
                set.add(str1.charAt(i));
            }
            for(int i=0;i<str2.length();i++){
                char ch=str2.charAt(i);
                if(!set.contains(ch)){
                    System.out.println(ch);
                    set.add(ch);
                }
            }
        }
    }
}
